package org.file5.dao.impl;

import org.apache.log4j.Logger;
import org.file5.dao.ArticleDao;
import org.file5.dao.AttachmentDao;
import org.file5.dao.BaseDao;
import org.file5.dao.CategoryDao;
import org.file5.dao.DaoFascade;
import org.file5.dao.EntityIndexDao;
import org.file5.domain.Article;
import org.file5.domain.Attachment;
import org.file5.domain.Category;
import org.file5.domain.Entity2Entity;
import org.file5.domain.EntityComment;
import org.file5.domain.EntityIndex;
import org.file5.domain.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.googlecode.objectify.ObjectifyService;

@Service(value = "daoFascade")
public class DaoFascadeImpl implements DaoFascade {
	private  final Logger logger = Logger.getLogger(this.getClass());

	static {
        ObjectifyService.register(Attachment.class);
        ObjectifyService.register(Article.class);
        ObjectifyService.register(Category.class);
        ObjectifyService.register(Entity2Entity.class);
        ObjectifyService.register(EntityComment.class);
        ObjectifyService.register(Person.class);


        ObjectifyService.register(EntityIndex.class);
    }

	@Autowired
	protected BaseDao baseDao;


	@Autowired
	protected ArticleDao articleDao;



	@Autowired
	protected CategoryDao categoryDao;





	@Autowired
	protected AttachmentDao attachmentDao;



	@Autowired
	protected EntityIndexDao entityIndexDao;


	@Override
	public EntityIndexDao getEntityIndexDao() {
		return entityIndexDao;
	}


	@Override
	public CategoryDao getCategoryDao() {
		return categoryDao;
	}


	@Override
	public BaseDao getBaseDao() {
		return baseDao;
	}



	@Override
	public AttachmentDao getAttachmentDao() {
		return attachmentDao;
	}



	@Override 
	public ArticleDao getArticleDao() {
		return articleDao;
	}


	
}
